import 'package:flutter_again/models/repository.dart';
import 'package:flutter_again/models/website_link.dart';
import 'package:flutter_again/dao/website_link_dao.dart';

class WebsiteLinkRepository implements Repository<WebsiteLink, int, CreateWebsiteLinkRequest, UpdateWebsiteLinkRequest> {
  final WebsiteLinkDao localDataSource; // 例如TaskDao

  WebsiteLinkRepository({ required this.localDataSource });

  @override
  read() async {
    return await localDataSource.read();
  }
  @override
  create(entity) async {
    return await localDataSource.create(entity);
  }
  @override
  update(entity) async {
    return await localDataSource.update(entity);
  }
  @override
  delete(entity) async {
    return await localDataSource.delete(entity);
  }
  @override
  readById(int id) async {
    return await localDataSource.readById(id);
  }
}
